'''
Created on Dec 5, 2010

@author: jackreilly
'''

from google.appengine.ext import webapp
from jettube.models import Station
from jettube.client.responseUtil import dumpDictionary, dumpTemplate
from types import ClassType
import logging

class StationNamesHandler( webapp.RequestHandler ):
    def get( self ):
        dumpDictionary(Station.getStationsDictionaryForDropDownFromRequest(self.request), self.response)
        
class RegisterNewStationHandler(webapp.RequestHandler):
    def post(self):
        station = Station.registerNewStationFromRequest(self.request)
        dumpTemplate(self, '', {'station':station}, 'stationRegister')
        
        
class InviteFriendsToStationHandler(webapp.RequestHandler):
    def post(self):
        logging.error(self.request.arguments())
        for arg in self.request.arguments():
            logging.error(self.request.get(arg))
        self.response.out.write('hello')